Replication material for

	Citizen Forecasts of the 2021 German Election
	
	Andreas E. Murr, University of Warwick, a.murr@warwick.ac.uk
	Michael S. Lewis-Beck, University of Iowa, michael-lewis-beck@uiowa.edu

---------------------------------------------------------------

1) R code

The file "analysis.R" performs the analyses reported in the paper and supplementary material (with the exception of Table A1, see below).  For the file and the corresponding output see the "log-file-analysis.pdf".

---------------------------------------------------------------

2) Codebook

-- Coding of parties

cdu = CDU/CSU
spd = SPD
fpd = FDP
gru = Grüne
lin = Linke
oth = Others

--- election-data-germany.csv

bundestag = index of bundestag
date = date of election (dd/mm/yyyy)
year = election year
vote.xxx = vote share (in %) of party xxx
gcoal = election with an incumbent grand coalition (0=no, 1=yes)
chancellor = chancellor after election (1=cdu, 2=spd)

--- dataX.csv (where X = 1, 2, 3, or 5 months of lead time)

year = election year
bundestag = index of bundestag
date = date of election (dd/mm/yyyy)
vote.xxx = vote share of party xxx
gcoal = election with an incumbent grand coalition (0=no, 1=yes)
chancellor = chancellor after election (1=cdu, 2=spd)
exp.xxx = proportion of people in politbarometer survey who said that party would win (cdu, spd) or that party would win or be part of the winning coalition (fdp, gru, lin)

---------------------------------------------------------------

3) Information to reconstruct the analysis data sets

This replication archive contains the R code needed to reconstruct the analysis data sets as well as one of two of the data sets relevant for the reconstruction.

The code file "create-data.R" creates "data1.csv", "data2.csv", "data3.csv", "data5.csv" where the number in the file name indicates the lead time of the survey.  This file also creates Table A1 in the supplemental material (see above).

To run the code, the following file (ZA5100_v2-0-0.dta) need to be acquired in addition:

Forschungsgruppe Wahlen, Mannheim. 2020. “Politbarometer 1977-2019 (Partielle Kumulation).” GESIS Datenarchiv, Köln. ZA2391 Datenfile Version 12.0.0. https://doi.org/10.4232/1.13631
